/**
 * Help
 * 
 * adds an input form into the head of a tasklist to filter the tasklist
 * 
 * @author flobo <bosselmann@gmail.com>
 * 
 */
var plugin_help = {
	_init: function() {
		var helpbutton = new Element('div',{
			id:"button_help",
			html:'| ?',
		    'events': {
		        'click': function () { 
		        	var floater = new Modal({
						width:600,
						height:400,
						windowtitle:'Timemachine Help',
						content:''
					});
					
					request('help:load',{context:'start'},function(response) {$('floating_content').innerHTML = response; });
		        }
		     }
		});
		helpbutton.inject($('topbar'), 'bottom');
	},
	
	showTopic:function(sel) {
		$('helpcontent').$$('div').each(function(e,i) { e.style.display='none';} );
		$('help_'+sel).show({opacity:0}).fade('in');
	}
}